<!DOCTYPE html>
<meta charset="utf-8">
<title><%= app_name %> - <%= t :login %></title>
<link href="<%= stylesheet_path "application" %>" rel="stylesheet">
<script src="<%= javascript_path "application" %>"></script>
<style>
  body {
    padding-top: 40px;
    padding-bottom: 40px;
    background-color: #eee;
  }

  .form-signin {
    max-width: 330px;
    padding: 15px;
    margin: 0 auto;
  }
  .form-signin .form-signin-heading,
  .form-signin .checkbox {
    margin-bottom: 20px;
  }
  .form-signin .checkbox {
    font-weight: normal;
  }
  .form-signin .form-control {
    position: relative;
    height: auto;
    -webkit-box-sizing: border-box;
       -moz-box-sizing: border-box;
            box-sizing: border-box;
    padding: 10px;
    font-size: 16px;
  }
  .form-signin .form-control:focus {
    z-index: 2;
  }
  .form-signin input[type="text"] {
    margin-bottom: -1px;
    border-bottom-right-radius: 0;
    border-bottom-left-radius: 0;
  }
  .form-signin input[type="password"] {
    margin-bottom: 10px;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
  }
</style>

<div class="container">

  <form class="form-signin" action="/" method="post">
    <h2 class="form-signin-heading"><%= t :please_sign_in %></h2>
    <% if session[:flash] %>
      <div class="alert alert-danger"><%= h session[:flash] %></div>
      <% session.delete(:flash) %>
    <% end %>
    <input type="text" class="form-control" name="uid" placeholder="<%= t User.fields["uid"] %>" required autofocus>
    <input type="password" class="form-control" name="password" placeholder="<%= t User.fields["password"] %>" required>
    <button class="btn btn-lg btn-primary btn-block" type="submit"><%= t :sign_in %></button>
  </form>

</div>
